import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login'
import layout from '../views/layout'
import company from '../views/layout/views/company'
import find from '../views/layout/views/find'
import my from '../views/layout/views/my'
import question from '../views/layout/views/question'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/layout',
    name: 'layout',
    component: layout,
    children: [
      { path: '/company', component: company },
      { path: '/find', component: find },
      { path: '/my', component: my },
      { path: '/question', component: question },
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
